using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICPrcPlyEntryMap : EntityTypeConfiguration<ICPrcPlyEntry>
    {
        public ICPrcPlyEntryMap()
        {
            // Primary Key
            this.HasKey(t => t.FEntryID);

            // Properties
            this.Property(t => t.FModel)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FNote)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FFlagSave)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("ICPrcPlyEntry");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FEntryID).HasColumnName("FEntryID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FRelatedID).HasColumnName("FRelatedID");
            this.Property(t => t.FModel).HasColumnName("FModel");
            this.Property(t => t.FAuxPropID).HasColumnName("FAuxPropID");
            this.Property(t => t.FUnitID).HasColumnName("FUnitID");
            this.Property(t => t.FBegQty).HasColumnName("FBegQty");
            this.Property(t => t.FEndQty).HasColumnName("FEndQty");
            this.Property(t => t.FCuryID).HasColumnName("FCuryID");
            this.Property(t => t.FPriceType).HasColumnName("FPriceType");
            this.Property(t => t.FPrice).HasColumnName("FPrice");
            this.Property(t => t.FBegDate).HasColumnName("FBegDate");
            this.Property(t => t.FEndDate).HasColumnName("FEndDate");
            this.Property(t => t.FLeadTime).HasColumnName("FLeadTime");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FChecked).HasColumnName("FChecked");
            this.Property(t => t.FIndex).HasColumnName("FIndex");
            this.Property(t => t.FTime).HasColumnName("FTime");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FBase).HasColumnName("FBase");
            this.Property(t => t.FBase1).HasColumnName("FBase1");
            this.Property(t => t.FBegQty_Base).HasColumnName("FBegQty_Base");
            this.Property(t => t.FEndQty_Base).HasColumnName("FEndQty_Base");
            this.Property(t => t.FInteger).HasColumnName("FInteger");
            this.Property(t => t.FClassTypeID).HasColumnName("FClassTypeID");
            this.Property(t => t.FBCust).HasColumnName("FBCust");
            this.Property(t => t.FB2CustCls).HasColumnName("FB2CustCls");
            this.Property(t => t.FB2Emp).HasColumnName("FB2Emp");
            this.Property(t => t.FB2EmpCls).HasColumnName("FB2EmpCls");
            this.Property(t => t.FB2VipGrp).HasColumnName("FB2VipGrp");
            this.Property(t => t.FB2Cust).HasColumnName("FB2Cust");
            this.Property(t => t.FB2ItemID).HasColumnName("FB2ItemID");
            this.Property(t => t.FB2Item).HasColumnName("FB2Item");
            this.Property(t => t.FFlagSave).HasColumnName("FFlagSave");
        }
    }
}
